]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
panel: Don't allow opening hidden menus via keybindings
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 23 Jan 2019 22:55:12 +0000 (23:55 +0100)
committerRay Strode <rstrode@redhat.com>
Tue, 5 Feb 2019 16:08:45 +0000 (11:08 -0500)
We shouldn't allow toggling menus that aren't supported by the
current session mode, but as indicators are hidden rather than
destroyed on mode switches, it is not enough to check for an
indicator's existence.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/851

js/ui/panel.js

index 3ce95a16a36fda3caf2cb87e750ec1efe72680fb..8a6cb77222c04780d5e7360c1afca57cca5b26cc 100644 (file)
@@ -957,8 +957,8 @@ class Panel extends St.Widget {
     }
 
     _toggleMenu(indicator) {
-        if (!indicator) // menu not supported by current session mode
-            return;
+        if (!indicator || !indicator.container.visible)
+            return; // menu not supported by current session mode
 
         let menu = indicator.menu;
         if (!indicator.actor.reactive)